.TH "vidpsnr" 1 "" ""


.SS NAME
.P
vidpsnr \-\- Find the Peak\-Signal\-to\-Noise Ratio between two videos.

.SS SYNOPSIS
.P
\fBvidpsnr\fR [ \fIOPTIONS\fR ] \fB\-o\fR \fI/path/to/original/video.avi\fR
                    \fB\-c\fR \fI/path/to/comparison/video.avi\fR
                    \fB\-l\fR \fI/path/to/psnr/log.csv\fR

.SS DESCRIPTION
.P
vidpsnr, a frontend to psnrcore, calculates the Peak\-Signal\-to\-Noise Ratio between two video files. The first video file is generally the original video, and the second is a modified version of the original. Often, the second video is encoded in a different codec (or the same codec, but with different options), or uses filters to improve or change the video. The aim of this script is to give concrete numbers to often subjective video quality comparisons.

.P
vidpsnr takes the two input videos and generates separate directories of frames using mplayer. The number of frames generated is controllable, as well as the individual mplayer options used to create the frames (to accommodate filter testing and more). After the frames have been made, vidpsnr calls psnrcore, which sequentially compares frames from both videos, calculating the PSNR for each frame, and finally averages the overall PSNR for both videos. Frame\-by\-frame data are written to a text file, while the final PSNR is returned to standard out.

.SS FEATURES
.RS
.IP \(bu 3
Calculates the PSNR between entire videos (or the first N frames).
.IP \(bu 3
Calculates the PSNR for each frame and saves the data in a comma separated values (.csv) file.
.IP \(bu 3
Passes individual mplayer options for both videos, allowing for filter testing.
.RE

.SS OPTIONS
.SS Required Options
.TP
\fB\-o\fR, \fB\-original\fR \fI/path/to/original/video.avi\fR
Specify the path to the original video file.

.TP
\fB\-c\fR, \fB\-compare\fR \fI/path/to/comparison/video.avi\fR
Specify the path to the comparison video file.  Note: the same video may be used to test filters by using the \fB*opts\fR parameters (see EXAMPLES).

.TP
\fB\-l\fR, \fB\-log\fR \fI/path/to/psnr/log.csv\fR
Specify the path to the data log for the frame\-by\-frame PSNR data. If the log doesn't exist, it will be created.

Recorded data: frame number, Y (or luminance) PSNR (dB), Cb (or blue chroma) PSNR (dB), Cr (or red chroma) PSNR (dB), whole frame PSNR (dB), frame PSNR error, cumulative error sum.

In cases where the images do not differ, the PSNR cannot be found (because the denominator is zero). Since the images are exactly the same, there is no 'noise', and the PSNR is infinite instead.

.SS Other Options
.TP
\fB\-f\fR, \fB\-frame\fR \fIFRAME\fR
By default, vidpsnr will find the PSNR between both entire videos. Give this option to limit PSNR calculation to the first \fIFRAME\fR frames.

.TP
\fB\-oo\fR, \fB\-origopts\fR \fB"\fR\fIMPLAYER OPTIONS\fR\fB"\fR
Specify additional options to be passed to mplayer when making frames for the original video. \fB"Surround in double quotes."\fR

.TP
\fB\-co\fR, \fB\-compopts\fR \fB"\fR\fIMPLAYER OPTIONS\fR\fB"\fR
Specify additional options to be passed to mplayer when making frames for the comparison video. \fB"Use double quotes!"\fR

.TP
\fB\-h\fR, \fB\-help\fR
Display a usage guide and exit.

.TP
\fB\-v\fR,  \fB\-version\fR
Print the version number and exit.

.SS EXAMPLES
.TP
vidpsnr \-o ./original.avi \-c ./comparison.avi \-l $HOME/psnr\-log.csv
Find the PSNR between both entire videos, and store the frame\-by\-frame data in $HOME/psnr\-log.csv

.TP
vidpsnr \-f 60 \-o ./original.avi \-c ./comparison.avi \-l $HOME/psnr\-log.csv
Find the PSNR between the first 60 frames of both videos, and store the frame\-by\-frame data in $HOME/psnr\-log.csv

.TP
vidpsnr \-co "\-vf pp=hb" \-o ./foo.avi \-c ./foo.avi \-l psnr\-log.csv
Evaluate the quality of mplayer's horizontal deblocking filter, and store the frame\-by\-frame data in psnr\-log.csv (in the present working directory)

.SS SEE ALSO
.P
\fBpsnrcore\fR(1), \fBprofile\fR(1)

.SS BUGS
.P
NONE (known)

.SS AUTHOR
.P
Streamlined and made robust by Joe Friedrichsen. Original idea and rough\-cut by Matthias Wieser.

.SS CONTACT
.P
Send bugs to vidprofile\-users@lists.berlios.de. Please see the vidprofile homepage (http://vidprofile.berlios.de) for further information.


.\" man code generated by txt2tags 2.3 (http://txt2tags.sf.net)
.\" cmdline: txt2tags -t man --infile=src/vidpsnr.t2t --outfile=./vidpsnr.man

